package com.datatools.entity;

import java.io.Serializable;

public class LocalIndex implements Serializable {

    protected static final long serialVersionUID = 1L;

//    TABLE_CAT String => table catalog (may be null)
    private String tableCat;
//    TABLE_SCHEM String => table schema (may be null)
    private String tableSchem;
//    TABLE_NAME String => table name
    private String tableName;
//    NON_UNIQUE boolean => Can index values be non-unique. false when TYPE is tableIndexStatistic
    private boolean nonUnique;
//    INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is tableIndexStatistic
    private String indexQualifier;
//    INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
    private String indexName;
//    TYPE short => index type:
    private short type;
//    tableIndexStatistic - this identifies table statistics that are returned in conjuction with a table's index descriptions
//    tableIndexClustered - this is a clustered index
//    tableIndexHashed - this is a hashed index
//    tableIndexOther - this is some other style of index
//
//    ORDINAL_POSITION short => column sequence number within index; zero when TYPE is tableIndexStatistic
    private short ordinalPosition;
//    COLUMN_NAME String => column name; null when TYPE is tableIndexStatistic
    private String columnName;
//    ASC_OR_DESC String => column sort sequence, "A" => ascending, "D" => descending, may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic
    private String ascOrDesc;
//    CARDINALITY long => When TYPE is tableIndexStatistic, then this is the number of rows in the table; otherwise, it is the number of unique values in the index.
    private long cardinality;
//    PAGES long => When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.
    private long pages;
//    FILTER_CONDITION String => Filter condition, if any. (may be null)
    private String filterCondition;

    @Override
    public String toString() {
        return this.indexName;
    }

    public String getTableCat() {
        return tableCat;
    }

    public void setTableCat(String tableCat) {
        this.tableCat = tableCat;
    }

    public String getTableSchem() {
        return tableSchem;
    }

    public void setTableSchem(String tableSchem) {
        this.tableSchem = tableSchem;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public boolean isNonUnique() {
        return nonUnique;
    }

    public void setNonUnique(boolean nonUnique) {
        this.nonUnique = nonUnique;
    }

    public String getIndexQualifier() {
        return indexQualifier;
    }

    public void setIndexQualifier(String indexQualifier) {
        this.indexQualifier = indexQualifier;
    }

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public short getType() {
        return type;
    }

    public void setType(short type) {
        this.type = type;
    }

    public short getOrdinalPosition() {
        return ordinalPosition;
    }

    public void setOrdinalPosition(short ordinalPosition) {
        this.ordinalPosition = ordinalPosition;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getAscOrDesc() {
        return ascOrDesc;
    }

    public void setAscOrDesc(String ascOrDesc) {
        this.ascOrDesc = ascOrDesc;
    }

    public long getCardinality() {
        return cardinality;
    }

    public void setCardinality(long cardinality) {
        this.cardinality = cardinality;
    }

    public long getPages() {
        return pages;
    }

    public void setPages(long pages) {
        this.pages = pages;
    }

    public String getFilterCondition() {
        return filterCondition;
    }

    public void setFilterCondition(String filterCondition) {
        this.filterCondition = filterCondition;
    }
}
